import { defineStore } from 'pinia'
import { PAUSE } from '@/utils/global'

export const useCounterStore = defineStore('counter', {
  state: () => ({ count: 0, name: 'Eduardo' }),
  getters: {
    doubleCount: (state) => state.count * 2,
  },
  actions: {
    increment() {
      this.count++
    },
  },
})

// 改标题
export const useTitleStore = defineStore('title', {
  state: () => ({
    title: '',
  })
})

// 屏幕尺寸对应的画布倍率
export const useResizeStore = defineStore('resize', {
  state: () => ({
    resize: 1
  })
})
